#ifndef TITLE_DATASET_H
#define TITLE_DATASET_H

#include "title_adapter.h"
#include <iostream>
#include <list>

using namespace std;

namespace handler {
	class title_dataset {
	public:
		typedef boost::shared_ptr<handler::title_dataset> ptr;
		typedef handler::title_adapter data;
		typedef boost::shared_ptr<handler::title_adapter> data_ptr;
		typedef list<data> data_collection;
		typedef list<data_ptr> data_coll;

		title_dataset() {}
		~title_dataset() {}

		data_coll& get_elements() { return _coll; }
		void push_back(data_ptr p) { _coll.push_back(p); }
		bool empty() const { return _coll.empty(); }
		void print() const
		{
			typedef data_coll::const_iterator it;
			for(it i = _coll.begin(); i != _coll.end(); ++i) {
				(*i)->get()->print();
			}
		}
	private:
		data_coll _coll;
	};
}

ostream& operator << (ostream &rhs, handler::title_dataset &set);

#endif

